import service from '@/utils/request'
const BASE_URL = 'api-user'
// 获取列表
export function studentList(data) {
    return service({
        url: `${BASE_URL}/students`,
        method: 'get',
        params: data
    })
}

// 新增
export function addStudent(data) {
    return service({
        url: `${BASE_URL}/student`,
        method: 'post',
        data
    })
}
// 获取详情
export function studentDetail(studentId) {
    return service({
        url: `${BASE_URL}/student/${studentId}`,
        method: 'get'
    })
}
// 编辑
export function editStudent(data) {
    return service({
        url: `${BASE_URL}/student`,
        method: 'put',
        data
    })
}

// 删除
export function deleteStudent(studentId) {
    return service({
        url: `${BASE_URL}/student/${studentId}`,
        method: 'delete'
    })
}

//启用/停用
export function enableStudent(studentId) {
    return service({
        url: `${BASE_URL}/student/enable/${studentId}`,
        method: 'put',
    })
}
